Definition (first-order logic)

  • Let 𝒱={x,y,...,}\mathcal{V} = \{x,y,...,\} be a set of variables.
  • Let ℛ={P,Q,...}\mathcal{R} = \{P,Q,...\} and ℱ={f,g,...}\mathcal{F} = \{f,g,...\} be a vocabulary of predicate/function symbols.
  • predicate and function symbols equipped with arity ar⁡:ℛ∪ℱ→ℕ\operatorname{ar} : \mathcal{R} \cup \mathcal{F} \to \mathbb{N}
  • first-order terms and formulas over 𝒱,ℛ,ℱ\mathcal{V}, \mathcal{R}, \mathcal{F} given by grammar:
    • s,t::=x|f(t1,...,tar⁡(f))s, t ::= x \mid f(t_1,...,t_{\operatorname{ar}(f)}) (terms)
    • ϕ,ψ::=⊤|⊥\phi, \psi ::= \top \mid \bot (atomic truth values)
      • |P(t1,...,tar⁡(f))|s=t\mid P(t_1,...,t_{\operatorname{ar}(f)}) \mid s = t (predicates and equality)
      • |ϕ∨ψ|¬ϕ\mid \phi \lor \psi \mid \neg \phi (Boolean connectives)
      • |∃x.ϕ\mid \exists x.\phi (existential quantification)
  • further connectives definable:
    • ϕ→ψ≜¬ϕ∨ψ\phi \to \psi \triangleq \neg \phi \lor \psi
    • s≠t≜¬(s=t)s \neq t \triangleq \neg (s=t)
    • ϕ∧ψ≜¬(¬ϕ∨¬ψ)\phi \land \psi \triangleq \neg(\neg \phi \lor \neg \psi)
    • ∀x.ϕ≜¬(∃x.¬ϕ)\forall x.\phi \triangleq \neg(\exists x.\neg\phi)
    • etc.
  • fix precedence to avoid parentheses: ¬\neg > ∧,∨\land, \lor > ∃,∀\exists, \forall

Notes

  • first-order logic allows general assertions using quantifiers
    • universal quantifier ∀\forall
    • existential quantifier ∃\exists
      • it is dual to universal quantifier (c.f. modal logic □\Box and ◊\Diamond)

See also


References

  1. https://www-sop.inria.fr/members/Martin.Avanzini/teaching/2021/AL/slides/w2.pdf
  2. https://en.wikipedia.org/wiki/First-order_logic
  3. https://leanprover-community.github.io/logic_and_proof/first_order_logic.html
  4. https://web.stanford.edu/class/archive/cs/cs103/cs103.1232/lectures/04/Condensed Slides.pdf
  5. Forall x: Calgary: an introduction to formal logic. Calgary: University of Calgary, 2023. [Online]. Available: https://forallx.openlogicproject.org/